﻿using System;
using System.Diagnostics;

namespace VASJ.Model.Helper
{
    public static class ExcelHelper
    {
        public static void KillExcel()
        {
            try
            {
                foreach (Process p in Process.GetProcesses())
                {
                    if (p.ProcessName == "EXCEL")
                    {
                        p.Kill();
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Log.ErrorFormat("KillExcel has throw exception: {0}", ex.Message);
            }
        }
    }
}
